#include<iostream>
using namespace std;
typedef struct node
{
    struct node* next;
    int data;



}node;
node* createnode(int n)
{
    node* newhead = new  node();
    node* cur = newhead;
    for (int i = 1; i <= n; i++)
    {
        node* newnode = new  node();
        newnode->data = i;
        cur->next = newnode;
        cur = cur->next;





    }
    return newhead;






}


int main(int n, int k) {
    node* head =createnode(n);
    node* cur = head;
    while (cur)
    {
        cout << cur->data << " ";
        cur = cur->next;
    }
    return 0;
}